package com.base.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * mq消费者测试
 * @author gxd
 * @since 2025/6/8
 */
@Slf4j
@Component
public class RabbitMqListener {

    @RabbitListener(queues = RabbitMQConfig.QUEUE_NAME)
    public void testListener(Message message) {
        log.info("rabbitmq消费消息：{}", new String(message.getBody()));
    }
}
